{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5a573ee0-86da-4008-a850-6c3ce1439d53",
   "metadata": {},
   "source": [
    "# Time-Series Bar Chart\n",
    "\n",
    "A bar chart showing values across time. This plot is useful for showing counts or totals over regular intervals like days, months, or years."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8b15e21f-bddd-43d6-a91a-173c100af04e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "\n",
    "np.random.seed(0)\n",
    "dates = pd.date_range(\"2024-01-01\", periods=12, freq=\"ME\")\n",
    "values = np.random.randint(100, 500, size=12)\n",
    "df = pd.DataFrame({'date': dates, 'sales': values})\n",
    "\n",
    "df.hvplot.bar(\n",
    "    x='date',\n",
    "    y='sales',\n",
    "    xlabel=\"Month\",\n",
    "    ylabel=\"Sales\",\n",
    "    title=\"Monthly Sales (Bokeh)\",\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c04e8ab9-f458-442f-b27a-cbf0e5570a8e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "np.random.seed(0)\n",
    "dates = pd.date_range(\"2024-01-01\", periods=12, freq=\"ME\")\n",
    "values = np.random.randint(100, 500, size=12)\n",
    "df = pd.DataFrame({'date': dates, 'sales': values})\n",
    "\n",
    "df.hvplot.bar(\n",
    "    x='date',\n",
    "    y='sales',\n",
    "    xlabel=\"Month\",\n",
    "    ylabel=\"Sales\",\n",
    "    title=\"Monthly Sales (Bokeh)\",\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "90e6c4bd-b623-44fc-b7bc-a11c3014053c",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Bar Plots reference documentation](../../ref/api/manual/hvplot.hvPlot.bar.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
